﻿#Include ..\ui\main.ahk

class BaseHandle {
  static nullable := false

  static Handle(parsedObj) => BaseHandle.Succ('default echo')
  static Succ(r, extra := '') => BaseHandle.Done(r, true, extra)
  static Fail(r, extra := '') => BaseHandle.Done(r, false, extra)
  static Done(r, flag, extra := '') => { flag: flag, r: r, extra: extra }
  static Async(cb) => { flag: true, r: cb, extra: MeowTool.asyncFlag }
  static Spec(*) => ''

  static Fallback(e) => e.Message '`n' e.File '`n' e.Line '`n' e.Stack
}
